import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/art_list',
    name: 'home',
    component: Home,
    children:[
      {
        path:'/art_list',
        name:'art_list',
        component:() => import(/* webpackChunkName: "art_list" */ '../views/List.vue')
      },
      {
        path:'/art_detail',
        name:'art_detail',
        component:() => import(/* webpackChunkName: "art_detail" */ '../views/Detail.vue')
      },
      {
        path:'/art_write',
        name:'art_write',
        component:() => import(/* webpackChunkName: "art_write" */ '../views/Write.vue')
      },
    ]
  },
]

const router = new VueRouter({
  routes
})



export default router
